<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>htmlcss 阶段</title>
    <style>
        ul {
            padding: 0;
            margin: 0;
            list-style: none;
            width: 600px;
            background-color: #ccc;
        }
        ul li {
            height: 98px;
            width: 98px;
            border: 1px solid #000; 
            float: left;
        }

        .clear {
            clear: both;
        }
        .clearfix::after {
            content: "";
            display: block;
            clear: both;
        }
        ul {
            height: 100px;
        }
    </style>
</head>
<body>
    <ul class="clearfix">
        <li></li>
        <li></li>
        <li></li>
        <li></li>
        <!-- <div class="clear"></div> -->
    </ul>

</body>
</html>